package com.haogu.service;

import com.haogu.entity.Announcement;
import com.haogu.entity.Department;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

@Service
public interface Announcements {
    /**
     * 显示所有公告
     *
     * @return
     */
    Map selectAnnouncement(Integer page, Integer rows, String title, String departmentid);

    /**
     * 查询某条公告
     * @param id
     * @return
     */
    Announcement selectOneAnnous(Integer id);

    /**
     * 部门查询
     * @return
     */
    List<Department> selectDepartment();

    /**
     * 添加公告
     * @param announcement
     * @return
     */
    Map insertAnnous(Announcement announcement);

    /**
     * 修改
     * @param announcement
     * @return
     */
    int changes1(Announcement announcement);

    /**
     * 删除
     * @param id
     * @return
     */
    int del(Integer id);

    /**
     * 查询公告总数
     * @return
     */
    int selectCounts();
}
